<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>map</title>
</head>
<body>
        <script type="text/javascript" >
        	let arr =[1,2,3,5,6,-66,90]
           let a= arr.map(el=>{
                if(el<0){
                    el=0;
                }
                return el;
            });
        	console.log(a)

            let b = arr.map(ee=>ee<0?ee=666:ee)
            console.log(b)
        </script>
</body>
</html>